home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / asmsrc / meltdown.lha / MISC.SOURCE / Vert.s < prev    next >
Encoding:
Text File  |  1988-07-19  |  5.5 KB  |  239 lines

  1. *****************************************************************************
  2. *                                                                           *
  3. *                Vertical Razta Routines                *
  4. *                                                                           *
  5. *  Start Date : 24/3/91                                                     *
  6. * Last Update : 24/3/91                                                     *
  7. *                                  Code : Melt Down *
  8. *                                                                           *
  9. *****************************************************************************
  10.  
  11. ; Include the macros
  12.  
  13.     Incdir    Df1:
  14.     Include    Source/Macro
  15.  
  16. *****************************************************************************
  17.  
  18. ; Dont forget to use chip ram
  19.  
  20.     Chip
  21.     
  22. *****************************************************************************
  23.  
  24. ; Kill the operating system for good mesure
  25.  
  26.     Kill        
  27.     
  28. *****************************************************************************
  29.  
  30. ; Load custom and set up copper list
  31.  
  32.     Lea    Custom,A5
  33.     Move.l    #Copper,Cop1lch(a5)
  34.     
  35. *****************************************************************************
  36.  
  37. ; Main routine here
  38.  
  39. Mouse
  40.     Move.l    $dff004,d2
  41.     And.l    #$1ff00,d2    
  42.     Cmp.l    #$100,d2
  43.     Bne.s    Mouse
  44.  
  45.     Lea    $70000,A1
  46.     Move.l    #120/4,d7
  47. ShagA
  48.     Clr.l    (a1)+
  49.     Dbf    D7,Shaga
  50.  
  51.     Bsr    BobLoop
  52.     Tstmice    Mouse                ; Pressed the mouse
  53.     
  54. *****************************************************************************
  55.  
  56. ; Return operating system and go back to user
  57.  
  58.     Heal
  59.     Clr.l    D0                ; No error
  60.     Rts
  61.     
  62. *****************************************************************************
  63.  
  64. BobLoop
  65.     Move.l    X1SpdInc,D0
  66.     Add.l    D0,X1pt
  67.     And.l    #$03fe03fe,X1pt
  68.     Move.w    #-2,Bltamod(a5)
  69.     Move.w    #-2,Bltbmod(a5)
  70.     Move.w    #36,Bltcmod(a5)
  71.     Move.w    #36,Bltdmod(a5)
  72.     Move.l    #$ffff0000,Bltafwm(a5)
  73.     Move.l    #$70000,Bltcpth(a5)
  74.     Move.l    #$70000,Bltdpth(a5)
  75.     Lea    XSin,A0
  76.     Lea    XSin,A3
  77.     Add.w    X1pt,A0
  78.     Add.w    X2pt,A3
  79.     Lea    Bob,A1
  80.     Lea    Mask,A2
  81.     Move.l    #128,D7
  82.     Move.w    #0,D1
  83.     Move.w    #0,D2
  84.     Move.w    X1inc,D3
  85.     Move.w    X2inc,D4
  86.     Move.l    #40,D5
  87. BlitLoop
  88.     Move.b    $dff006,D6
  89.     Cmp.b    D5,D6
  90.     Bne.s    BlitLoop
  91.     Add.w    #2,D5
  92.     Moveq    #0,d0
  93.     Move.w    (a0,D1),d0    
  94.     Add.w    (a3,D2),d0    
  95.     Add.w    D3,D1
  96.     Add.w    D4,D2
  97.     Move.l    A2,Bltapth(a5)
  98.     Move.l    A1,Bltbpth(a5)
  99.     Ror.l    #4,D0
  100.     Add.w    D0,D0
  101.     Move.w    D0,Bltcptl(a5)
  102.     Move.w    D0,Bltdptl(a5)
  103.     Swap    D0
  104.     Move.w    D0,Bltcon1(a5)
  105.     Or.w    #$0fca,D0
  106.     Move.w    D0,Bltcon0(a5)
  107.     Move.w    #3*64+2,Bltsize(a5)
  108.     Dbf    D7,BlitLoop
  109.     Rts
  110.     
  111. *****************************************************************************
  112.  
  113. ; All copper list after here
  114.  
  115. Copper
  116.  
  117.     Spr_Off                    ; Switch sprites off
  118.     Cmove    $2881,Diwstrt
  119.     Cmove    $2cc1,Diwstop
  120.     Cmove    $0038,Ddfstrt
  121.     Cmove    $00d0,Ddfstop
  122.     Cmove    -40,Bpl1mod            
  123.     Cmove    -40,Bpl2mod            
  124.     Cmove    $0000,Color00
  125.     Cmove    $0222,Color01
  126.     Cmove    $0444,Color02
  127.     Cmove    $0666,Color03
  128.     Cmove    $0888,Color04
  129.     Cmove    $0aaa,Color05
  130.     Cmove    $0ccc,Color06
  131.     Cmove    $0fff,Color07
  132.     Cmove    $0007,Bpl1pth
  133.     Cmove    $0000,Bpl1ptl
  134.     Cmove    $0007,Bpl2pth
  135.     Cmove    $0028,Bpl2ptl
  136.     Cmove    $0007,Bpl3pth
  137.     Cmove    $0050,Bpl3ptl
  138.     Cmove    $3200,Bplcon0
  139.     Endcop
  140.     
  141. *****************************************************************************
  142.  
  143. XSin
  144.     Rept    5
  145.     dc.w    150,150,150,150,150,150,150,150
  146.     dc.w    150,150,149,149,149,149,149,149
  147.     dc.w    149,148,148,148,148,148,147,147
  148.     dc.w    147,146,146,146,146,145,145,145
  149.     dc.w    144,144,144,143,143,142,142,142
  150.     dc.w    141,141,140,140,139,139,138,138
  151.     dc.w    137,137,136,136,135,135,134,134
  152.     dc.w    133,132,132,131,131,130,129,129
  153.     dc.w    128,127,127,126,125,125,124,123
  154.     dc.w    123,122,121,120,120,119,118,117
  155.     dc.w    117,116,115,114,114,113,112,111
  156.     dc.w    110,110,109,108,107,106,105,105
  157.     dc.w    104,103,102,101,100,99,99,98
  158.     dc.w    97,96,95,94,93,92,91,91
  159.     dc.w    90,89,88,87,86,85,84,83
  160.     dc.w    82,81,81,80,79,78,77,76
  161.     dc.w    75,74,73,72,71,70,69,69
  162.     dc.w    68,67,66,65,64,63,62,61
  163.     dc.w    60,59,59,58,57,56,55,54
  164.     dc.w    53,52,51,51,50,49,48,47
  165.     dc.w    46,45,45,44,43,42,41,40
  166.     dc.w    40,39,38,37,36,36,35,34
  167.     dc.w    33,33,32,31,30,30,29,28
  168.     dc.w    27,27,26,25,25,24,23,23
  169.     dc.w    22,21,21,20,19,19,18,18
  170.     dc.w    17,16,16,15,15,14,14,13
  171.     dc.w    13,12,12,11,11,10,10,9
  172.     dc.w    9,8,8,8,7,7,6,6
  173.     dc.w    6,5,5,5,4,4,4,4
  174.     dc.w    3,3,3,2,2,2,2,2
  175.     dc.w    1,1,1,1,1,1,1,0
  176.     dc.w    0,0,0,0,0,0,0,0
  177.     dc.w    0,0,0,0,0,0,0,0
  178.     dc.w    0,0,1,1,1,1,1,1
  179.     dc.w    1,2,2,2,2,2,3,3
  180.     dc.w    3,4,4,4,4,5,5,5
  181.     dc.w    6,6,6,7,7,8,8,8
  182.     dc.w    9,9,10,10,11,11,12,12
  183.     dc.w    13,13,14,14,15,15,16,16
  184.     dc.w    17,18,18,19,19,20,21,21
  185.     dc.w    22,23,23,24,25,25,26,27
  186.     dc.w    27,28,29,30,30,31,32,33
  187.     dc.w    33,34,35,36,36,37,38,39
  188.     dc.w    40,40,41,42,43,44,45,45
  189.     dc.w    46,47,48,49,50,51,51,52
  190.     dc.w    53,54,55,56,57,58,59,59
  191.     dc.w    60,61,62,63,64,65,66,67
  192.     dc.w    68,69,69,70,71,72,73,74
  193.     dc.w    75,76,77,78,79,80,81,81
  194.     dc.w    82,83,84,85,86,87,88,89
  195.     dc.w    90,91,91,92,93,94,95,96
  196.     dc.w    97,98,99,99,100,101,102,103
  197.     dc.w    104,105,105,106,107,108,109,110
  198.     dc.w    110,111,112,113,114,114,115,116
  199.     dc.w    117,117,118,119,120,120,121,122
  200.     dc.w    123,123,124,125,125,126,127,127
  201.     dc.w    128,129,129,130,131,131,132,132
  202.     dc.w    133,134,134,135,135,136,136,137
  203.     dc.w    137,138,138,139,139,140,140,141
  204.     dc.w    141,142,142,142,143,143,144,144
  205.     dc.w    144,145,145,145,146,146,146,146
  206.     dc.w    147,147,147,148,148,148,148,148
  207.     dc.w    149,149,149,149,149,149,149,150
  208.     dc.w    150,150,150,150,150,150,150,150
  209.     Endr
  210.     
  211. *****************************************************************************
  212.  
  213. X1Inc
  214.     Dc.w    14
  215. X2Inc
  216.     Dc.w    8
  217. X1SpdInc    
  218.     Dc.w    8
  219. X2SpdInc    
  220.     Dc.w    2
  221. X1pt
  222.     Dc.w    0    
  223. X2pt
  224.     Dc.w    0
  225.         
  226. *****************************************************************************
  227.  
  228. Bob
  229.     Dc.w    %1010101111010101
  230.     DC.w    %0110011111100110
  231.     Dc.w    %0001111111111000
  232. Mask
  233.     Dc.w    %1111111111111111
  234.     Dc.w    %1111111111111111
  235.     Dc.w    %1111111111111111
  236.  
  237. *****************************************************************************
  238.  
  239.